<template>
	<div class="addGoodBox" >
		<u-popup v-model="visiable" mode="right">
			<view>
				<view class="top">
					<view class="top-tit">添加商品</view>
					<image @click="close" class="close-btn" src="https://www.yongshantuan.cn/images/yongshan/arrowHui.png"
						mode=""></image>
				</view>
				<view class="content">
					<view class="list">
						<view class="title">商品名称</view>
						<view class="inputContent">
							<u-input type="text" v-model="goodInfo.tradeName" placeholder="请输入商品名称"></u-input>
						</view>
					</view>
					<view class="list switchList">
						<view class="title">必选项:</view>
						<view class="">
							<u-switch v-model="switchChecked" activeColor="#FA690A" @change="switchChange"></u-switch>
						</view>
					</view>
					<view class="list">
						<view class="title">商品描述</view>
						<view class="inputContent">
							<u-input type="text" v-model="goodInfo.productDescription" placeholder="请填写商品描述"></u-input>
						</view>
					</view>
					<!-- <view class="list">
						<view class="title">门店名称</view>
						<view class="inputContent">
							<u-input type="text" :disabled="true" placeholder="请选择门店名称" @click="showSelects"
								v-model="goodInfo.storeName"></u-input>
							<image class="arrow"
								src="https://www.yongshantuan.cn/images/yongshan/platformSide/downArrow.png"
								mode=""></image>
						</view>
					</view> -->
					 <!-- v-if="selectStoreWithPrice.length!=0" -->
					<view class="list">
						<view class="title">选择价格</view>
						<view class="priceContent">
							<template v-if="selectStoreInfo.customPriceFlag=='否'">
								<view :class="{'checked':checkPriceIndex==index}"
									v-for="(item,index) in selectStoreWithPrice" :key="index"
									@click="checkThisPrice(index)">{{item}}元</view>
							</template>
							<template v-if="selectStoreInfo.customPriceFlag=='是'">
								<view class="custom">
									<u-input type="text" v-model="goodInfo.commodityPrice" placeholder="自定义价格" value=""
										@input="input" @focus="focus" input-align='center' />
								</view>
							</template>
						</view>
					</view>
					<view class="list">
						<view class="title">商品图上传</view>
						<!-- <view class="uploadContent">
							<u-upload ref="uUpload" :auto-upload="false" :fileList="fileList"
								:max-size="1 * 1024 * 1024" max-count="1" :show-progress="false">
							</u-upload>
						</view> -->
						<view class="addImg" @click="goToCropper">
							<image src="https://www.yongshantuan.cn/images/yongshan/platformSide/addImg.png"
								v-if="!foodImg" mode="aspectFill"></image>
							<image :src="foodImg" mode="" v-if="foodImg"></image>
						</view>
					</view>
					<view class="list">
						<view class="title spec">
							<view class="">
								<view style='margin-right: 10px;'>启用规格</view>
								<u-checkbox @change="radioChange" activeColor="#FA690A" shape="circle" v-model="goodInfo.specificationsFlag"></u-checkbox>
							</view>
							<view class="" @click="addFirstSpec">添加一级规格</view>
						</view>
						<view class="specContent">
							<block v-for="(item,index) in goodInfo.commoditySpecifications" :key="index">
								<view class="specList">
									<view class="">
										<u-input type="text" v-model="item.name" :clearable="false" placeholder="一级分类名">
										</u-input>
									</view>
									<view class="">
										<image
											src="https://www.yongshantuan.cn/images/yongshan/platformSide/add.png"
											mode="" @click="addSecoundSpec(index)"></image>
										<image
											src="https://www.yongshantuan.cn/images/yongshan/platformSide/del.png"
											mode="" @click="delFirstSpec(index)"></image>
									</view>
								</view>
								<block v-if="item.child&&item.child.length!=0">
									<view class="specList secound" v-for="(childItem,childIndex) in item.child"
										:key="childIndex">
										<view class="">
											<view class="">
												<u-input type="text" :clearable="false" v-model="childItem.name"
													placeholder="二级分类名">
												</u-input>
											</view>
											<view class=""
												v-if="selectStoreInfo.customPriceFlag=='是'&&checkPriceIndex==999&&(goodInfo.commodityPrice===null||goodInfo.commodityPrice==='')">
												<u-input type="text" :clearable="false" v-model="childItem.price"
													placeholder="价格">
												</u-input>
											</view>
										</view>
										<view class="">
											<!-- <image
												src="https://www.yongshantuan.cn/images/yongshan/platformSide/add.png"
												mode=""></image> -->
											<image
												src="https://www.yongshantuan.cn/images/yongshan/platformSide/del.png"
												mode="" @click="delSecoundSpec(index,childIndex)"></image>
										</view>
									</view>
								</block>
							</block>
						</view>
					</view>
					<view class="list">
						<view class="title">限购</view>
						<view class="inputContent">
							<u-input type="text" placeholder="-1无限库存，0为无库存" v-model="goodInfo.limitBuy"></u-input>
						</view>
					</view>
					<view class="list">
						<view class="title">排序</view>
						<view class="inputContent">
							<u-input type="text" placeholder="请输入商品排序的数字，数字越低越优先展示" v-model="goodInfo.sort"></u-input>
						</view>
					</view>
					<view class="list">
						<view class="title">是否上架</view>
						<view class="stateContent">
							<view class="stateButton" @click="goodInfo.upFlag='上架中'"
								:class="{'check':goodInfo.upFlag=='上架中'}">上架</view>
							<view class="stateButton" @click="goodInfo.upFlag='下架中'"
								:class="{'check':goodInfo.upFlag=='下架中'}">下架</view>
						</view>
					</view>
					<view class="commenButton" @click="submit">保存</view>
				</view>
			</view>
		</u-popup>
		<view class="selectBox">
			<u-popup mode="bottom" v-model="showSelect" :closeable="true" @touchmove.stop.prevent="">
				<view class="selectContent">
					<view class="title">请选择门店</view>
					<view class="selList" v-for="(item,index) in storeList" :key="index" @click="selectThis(item)">
						{{item.storeName}}
					</view>
				</view>
			</u-popup>
		</view>
		<u-toast ref="uToast"></u-toast>
	</div>
</template>

<script>
	import {
		getStoreList,
		addGood,
		editGood,
		getMyInfo
	} from '@/utils/req/api.js'
	export default {
		props: ['show', 'type', 'editInfo'],
		data() {
			return {
				pageNo: 1,
				pageSize: 10,
				selectStoreInfo: '',
				selectStoreWithPrice: [],
				checkPriceIndex: 999,

				fileList: [],

				visiable: false,
				specCheck: '',
				goodInfo: {
					tradeName: '',
					goodDescribe: '',
					merchantId: '', //对应门店ID

					storeName: '',
					goodPrice: '',
					commoditySpecifications: [],
					upFlag: '上架中',
					limitBuy: '-1',
					commodityPrice: '',
					specificationsFlag: false
				},
				storeList: [],
				showSelect: false,

				switchChecked: false,

				foodImg: ''
			}
		},
		created() {
			uni.$on('uAvatarCropper', path => {
				console.log(path);
				this.foodImg = path;
			})
			
			
		},
		
		methods: {
			
			switchChange() {
				console.log('控制了开关')
				this.goodInfo.requiredFlag = this.switchChecked ? '是' : '否'
			},
			goToCropper() {
				// 此为uView的跳转方法，详见"文档-JS"部分，也可以用uni的uni.navigateTo
				uni.navigateTo({
					// 关于此路径，请见下方"注意事项"
					url: '/pages/u-avatar-cropper/u-avatar-cropper?destWidth=228&destHeight=168&rectWidth=228&rectHeight=168',
					success: res => {
						console.log('res', res)
					},
					fail: err => {
						console.log('err', err)
					}
				})
			},
			async getMyInfo() {
				let res = await getMyInfo();
				this.selectStoreInfo = res.data.result;
				this.selectStoreWithPrice = res.data.result.storeUnitPrice?JSON.parse(res.data.result.storeUnitPrice):[]
			},
			//获取门店列表
			async getStoreList() {
				let obj = {
					pageNo: this.pageNo,
					pageSize: this.pageSize
				}
				let res = await getStoreList(obj);
				this.storeList = res.data.result.records;
				console.log('this.storeList,',this.storeList);
				if (this.type == 'edit' || this.type == 'copy') {
					let obj = JSON.parse(JSON.stringify(this.editInfo));
					let pic = obj.productPicture
					// this.fileList.push({
					// 	url: pic.indexOf('http') != -1 ? pic : getApp().globalData.BASE_IMG_URL + pic
					// })
					this.foodImg = pic.indexOf('http') != -1 ? pic : getApp().globalData.BASE_IMG_URL + pic;

					this.switchChecked = obj.requiredFlag == '是' ? true : false;
					obj.specificationsFlag = obj.specificationsFlag == '是' ? true : false;
					console.log('-----', obj.commoditySpecifications, obj.commoditySpecifications ? 1 : 2)
					obj.commoditySpecifications = obj.commoditySpecifications && obj.commoditySpecifications !=
						'null' ? JSON.parse(obj.commoditySpecifications) : new Array;
					console.log('-----', obj.commoditySpecifications)
					this.storeList.forEach(item => {
						if (item.id == obj.merchantId) {
							obj.storeName = item.storeName;
							this.selectStoreWithPrice = item.storeUnitPrice ? JSON.parse(item.storeUnitPrice) :
								[];
						}
					})

					if (this.selectStoreInfo.customPriceFlag != '是') {
						this.selectStoreWithPrice.forEach((item, index) => {
							if (obj.commodityPrice == item) {
								this.checkPriceIndex = index;
							}
						})
					}
					this.goodInfo = JSON.parse(JSON.stringify(obj))
				}
			},
			close() {
				this.clearData();
				this.$emit('hideBox')
				this.clearData();
			},
			radioChange(e) {
				this.goodInfo.specificationsFlag = e;
			},
			//添加一级规格
			addFirstSpec() {
				let flag = false;
				this.goodInfo.commoditySpecifications.forEach(item => {
					if (!item.name) {
						this.$showToast.call(this, '请填写一级规格名称', 'warning');
						flag = true;
					} else {
						item.child.forEach(childItem => {
							if (!childItem.name) {
								this.$showToast.call(this, '请填写二级规格名称', 'warning');
								flag = true;
							}
						})
					}
				})
				if (flag) {
					return;
				}
				// this.$nextTick(() => {
				// 	this.goodInfo.commoditySpecifications.push();
				// })
				this.$set(this.goodInfo.commoditySpecifications, this.goodInfo.commoditySpecifications.length, {
					name: '',
					child: [{
						name: '',
						price: ''
					}]
				})

			},
			//添加二级规格
			addSecoundSpec(index) {
				let flag = false;
				this.goodInfo.commoditySpecifications.forEach(item => {
					if (!item.name) {
						this.$showToast.call(this, '请填写一级规格名称', 'warning');
						flag = true;
					}
				})
				if (flag) {
					return;
				}
				this.goodInfo.commoditySpecifications[index].child.push({
					name: '',
					price: ''
				});
			},
			//删除一级规格
			delFirstSpec(index) {
				this.goodInfo.commoditySpecifications.splice(index, 1);
			},
			//删除二级规格
			delSecoundSpec(index,childIndex) {
				console.log('index',index)
				console.log('childIndex',childIndex)
				this.goodInfo.commoditySpecifications[index].child.splice(childIndex, 1);
			},
			//展示门店选择下拉框
			showSelects() {
				this.showSelect = true
			},
			//选择门店
			selectThis(item) {
				this.selectStoreInfo = item;

				this.selectStoreWithPrice = item.storeUnitPrice?JSON.parse(item.storeUnitPrice):[];

				this.goodInfo.storeName = item.storeName;
				this.goodInfo.merchantId = item.id;
				this.showSelect = false;
			},
			checkThisPrice(index) {
				if (index == this.checkPriceIndex) {
					this.checkPriceIndex = 999;
					this.goodInfo.commodityPrice = 0;
				} else {
					this.checkPriceIndex = index;
					this.goodInfo.commodityPrice = this.selectStoreWithPrice[this.checkPriceIndex]
				}
			},
			focus(e) {
				if (this.checkPriceIndex != 999) {
					this.$showToast.call(this, '请先取消选择已选择的价格', 'warning');
					this.customPrice = '';
				}
			},
			input(e) {
				if (this.checkPriceIndex != 999) {
					this.$showToast.call(this, '请先取消选择已选择的价格', 'warning');
					this.goodInfo.commodityPrice = ''
				}
			},
			//提交信息
			async submit() {
				if (!this.goodInfo.tradeName) {
					this.$showToast.call(this, '请输入商品名称', 'warning');
					return;
				}
				// if (!this.goodInfo.goodDescribe) {
				// 	this.$showToast.call(this, '请输入商品描述', 'warning');
				// 	return;
				// }
				// if (this.$refs.uUpload.lists.length == 0) {
				// 	this.$showToast.call(this, '请上传商品图片', 'warning');
				// 	return;
				// }
				if (!this.foodImg) {
					this.$showToast.call(this, '请上传商品图片', 'warning');
					return;
				}
				// if (!this.goodInfo.limitBuy) {
				// 	this.$showToast.call(this, '请输入是否', 'warning');
				// 	return;
				// }
				if (this.goodInfo.commodityPrice && isNaN(Number(this.goodInfo.commodityPrice))) {
					this.$showToast.call(this, '价格请输入数字', 'warning');
					return;
				}
				if (this.goodInfo.commodityPrice && this.goodInfo.commodityPrice<0) {
					this.$showToast.call(this, '商品价格必须大于零', 'warning');
					return;
				}
				// if (this.goodInfo.commodityPrice == 0) {
				// 	this.$showToast.call(this, '商品价格不能为0', 'warning');
				// 	return;
				// }
				if (this.goodInfo.commodityPrice && String(this.goodInfo.commodityPrice).split('.').length > 1 &&
					String(this.goodInfo.commodityPrice).split('.')[1].length > 2) {
					this.$showToast.call(this, '价格只能是两位小数', 'warning');
					return;
				}
				// if(!this.goodInfo.sort){
				// 	this.$showToast.call(this, '请输入商品排序', 'warning');
				// 	return;
				// }
				if (!this.goodInfo.limitBuy) {
					this.$showToast.call(this, '限购不能为空', 'warning');
					return;
				}
				console.log(this.goodInfo.limitBuy)
				if (this.goodInfo.limitBuy && isNaN(Number(this.goodInfo.limitBuy))) {
					this.$showToast.call(this, '限购请输入数字', 'warning');
					return;
				}
				if (this.goodInfo.limitBuy&&String(this.goodInfo.limitBuy).split('.').length!=1) {
					this.$showToast.call(this, '限购只能为整数', 'warning');
					return;
				}
				if (this.goodInfo.limitBuy<-1) {
					this.$showToast.call(this, '限购不能小于-1', 'warning');
					return;
				}
				if (this.goodInfo.sort && isNaN(Number(this.goodInfo.sort))) {
					this.$showToast.call(this, '商品排序请输入数字', 'warning');
					return;
				}
				if (this.goodInfo.sort&&this.goodInfo.sort<=0) {
					this.$showToast.call(this, '商品排序必须大于零', 'warning');
					return;
				}
				if (this.goodInfo.sort&&String(this.goodInfo.sort).split('.').length!=1) {
					this.$showToast.call(this, '商品排序必须为整数', 'warning');
					return;
				}


				if (this.goodInfo.commoditySpecifications) {
					let flag = false
					this.goodInfo.commoditySpecifications.forEach((item) => {
						if (!item.name) {
							this.$showToast.call(this, '一级规格名称不能为空', 'warning')
							flag = true
						} else {
							item.child.forEach((childItem) => {
								if (!childItem.name) {
									this.$showToast.call(this, '二级规格名称不能为空', 'warning')
									flag = true
								}
							})
						}
					})
					if (flag) {
						return
					}
				}

				console.log('commoditySpecifications', this.goodInfo.commoditySpecifications);

				//如果开启了规格--必填一种规格
				if (this.goodInfo.specificationsFlag && !this.goodInfo.commoditySpecifications) {
					this.$showToast.call(this, '由于您选择了规格，请至少新增一种规格', 'warning');
					return;
				}
				if (this.goodInfo.specificationsFlag && this.goodInfo.commoditySpecifications.length == 0) {
					this.$showToast.call(this, '由于您选择了规格，请至少新增一种规格', 'warning');
					return;
				}
				//如果没有自定义价格的权限--价格必选
				if (this.selectStoreInfo.customPriceFlag == '否' || !this.selectStoreInfo.customPriceFlag) {
					if (!this.goodInfo.commodityPrice && this.checkPriceIndex == 999) {
						this.$showToast.call(this, '请选择价格', 'warning')
						return
					}
				} else {
					//如果有自定义价格的权限
					//如果价格有值
					console.log(this.goodInfo.commodityPrice, this.goodInfo.commodityPrice !== 0)
					if (this.goodInfo.commodityPrice || this.goodInfo.commodityPrice === 0 || this.checkPriceIndex !=
						999) {
						//如果价格有值
					} else {
						console.log(this.goodInfo.commoditySpecifications)
						//如果价格没值，则判断规格中价格存在多个0或空的情况
						if (this.goodInfo.commoditySpecifications.length != 0) {
							let count = 0
							this.goodInfo.commoditySpecifications.forEach((item) => {
								item.child.forEach((childItem, childIndex) => {
									if (!childItem.price || childItem.price == 0) {
										count++
									}
								})
							})
							
							/* if (count >= this.goodInfo.commoditySpecifications.length) {
								this.$showToast.call(this, '不能所有一级规格的二级规格里面都存在不填价格和价格为0的情况', 'warning', '5000')
								return
							} */
						} else {
							this.$showToast.call(this, '商品的价格和商品规格的价格至少填写一个', 'warning', '5000')
							return
						}
					}
				}



				let obj = JSON.parse(JSON.stringify(this.goodInfo));
				if (!obj.limitBuy) {
					obj.limitBuy = -1;
				}
				obj.commoditySpecifications = JSON.stringify(obj.commoditySpecifications);
				obj.specificationsFlag = obj.specificationsFlag ? '是' : '否'
				if (this.checkPriceIndex != 999) {
					obj.commodityPrice = this.selectStoreWithPrice[this.checkPriceIndex]
				}

				if (this.foodImg.indexOf('://tmp') == -1&&this.foodImg.indexOf('wxfile:') == -1) {
					// if (this.foodImg.indexOf('data') == -1) {	// 非微信小程序
					// 复制、修改，不用上传图片，走这
					obj.productPicture = this.foodImg;
				} else {
					// 新增需要上传图片
					let upRes = await this.$uploadFile(this.foodImg);
					let {
						success,
						message
					} = JSON.parse(upRes.data);
					obj.productPicture = message;
				}
				if (this.type == 'copy') {
					this.$delete(obj, 'id')
				}
				if (this.type != 'edit') {
					let res = await addGood(obj);
					if (res.data.success) {
						this.$emit('showToast', '添加成功', 'success');
						this.clearData();
						this.$emit('hideBox', 'add');
					} else {
						this.$emit('showToast', res.data.message, 'warning');
					}
				} else {
					let res = await editGood(obj);
					if (res.data.success) {
						this.$emit('showToast', '编辑成功', 'success');
						this.clearData();
						this.$emit('hideBox', 'edit');
					} else {
						this.$emit('showToast', res.data.message, 'warning');
					}
				}
			},
			clearData() {
				// this.fileList = [];
				this.foodImg = '';
				this.goodInfo = {
					commoditySpecifications: [],
					upFlag: '上架中',
					limitBuy: '-1'
				};
				this.selectStoreInfo = '';
				this.selectStoreWithPrice = [];
				this.checkPriceIndex = 999;
				this.switchChecked = false;
			}
		},
		watch: {
			show(newVal) {
				console.log('watch show:', newVal)
				if (newVal) {
					this.getMyInfo()
					this.getStoreList();
				}
				this.visiable = newVal;
			},
			visiable(newVal) {
				if (!newVal) {
					this.$emit('hideBox');
					this.clearData()
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.top {
		font-size: 28rpx;
		font-weight: bold;
		line-height: 2;
		padding: 10rpx 32rpx;
		background-color: #FF9C40;
		color: #fff;
		position: relative;
		text-align: center;

		.close-btn {
			width: 20rpx;
			height: 20rpx;
			transform:rotate(180deg);
			position: absolute;
			left: 26rpx;
			top: 32rpx;
		}
		
	}

	.content {
		padding: 40rpx 32rpx;

		.list {
			margin-bottom: 48rpx;

			.u-checkbox {
				margin-left: 20rpx;
			}

			/deep/.u-checkbox__icon-wrap {
				border-radius: 50%;
			}

			/deep/.u-checkbox__icon-wrap--checked {
				background-color: #FA690A !important;
				border: 1px solid #FA690A !important;
			}

			.title {
				font-size: 24rpx;
				line-height: 1;
				margin-bottom: 16rpx;
			}

			.inputContent {
				position: relative;
				background-color: #f5f5f5;
				padding-left: 20rpx;

				.arrow {
					width: 20rpx;
					height: 20rpx;
					position: absolute;
					right: 34rpx;
					top: calc((100% - 20rpx) / 2);
				}
				
			}

			.priceContent {
				@include flexs();
				flex-wrap: wrap;

				>view {
					font-size: 28rpx;
					line-height: 40rpx;
					padding: 20rpx 40rpx;
					background-color: #f5f5f5;
					border-radius: 12rpx;
					margin-right: 20rpx;
					margin-bottom: 10rpx;
				}

				>.checked {
					border: 1px solid #F1B825;
					color: #F1B825;
				}

				>.custom {
					width: 196rpx;
					// height: 80rpx;
					height: 35px;
					padding: 0 0;
					border-radius: 12rpx;

					/deep/.u-input__input {
						font-size: 28rpx;
						line-height: 80rpx;
						height: 80rpx;
						min-height: auto !important;
						text-align: center;
						border-radius: 12rpx;
					}
				}
			}

			.spec {
				@include flexs(space-between, center);

				>view {
					@include flexs();

					.u-radio {
						margin-left: 20rpx;
					}

					/deep/.u-radio__icon-wrap--checked {
						background-color: #FA690A !important;
						border: 1px solid #FA690A !important;
					}

					&:nth-child(2) {
						font-size: 24rpx;
						color: #FA690A;
					}
					
				}
				
				/* /deep/.u-checkbox__icon-wrap__icon {
					line-height: 5px;
				} */
				
			}

			.specList {
				@include flexs(space-between, center);
				margin-bottom: 20rpx;

				>view:nth-child(1) {
					width: 50%;
				}

				>view:last-child {
					@include flexs(flex-end, center);

					image {
						width: 40rpx;
						height: 40rpx;
						margin-left: 10rpx;
					}
				}
			}

			.secound {
				margin-left: 20rpx;

				>view:nth-child(1) {
					width: 70%;
					@include flexs(flex-start, center);

					>view:nth-child(1) {
						margin-right: 20rpx;
					}
				}

				>view:nth-child(2) {
					width: 20%;
				}
			}

			.stateContent {
				@include flexs();

				>view {
					font-size: 28rpx;
					height: 88rpx;
					width: 176rpx;
					border-radius: 10rpx;
					background-color: #f5f5f5;
					line-height: 88rpx;
					color: rgba(0, 0, 0, 0.55);
					text-align: center;
					margin-right: 20rpx;
				}

				>.check {
					background-color: #fff7e7;
					border: 1px solid #FA690A;
					color: #FA690A;
				}
			}

			.addImg {
				width: calc(38rpx * 8);
				height: calc(28rpx * 8);

				image {
					width: 100%;
					height: 100%;
					border-radius: 10rpx;
				}
			}
		}

		.switchList {
			@include flexs(space-between, center);

			>view:nth-child(2) {
				font-size: 0
			}
		}


		.commenButton {
			background-color: #FA690A;
			margin-bottom: 100rpx;
		}
	}

	.selectContent {
		padding: 40rpx;

		.title {
			font-size: 32rpx;
			line-height: 2;
			font-weight: bold;
			text-align: center;
		}

		.selList {
			font-size: 28rpx;
			line-height: 40rpx;
			padding: 10rpx 0;
			border-bottom: 1px solid #eee;

			&:last-child {
				border-bottom: 0;
			}
		}
	}
</style>
<style lang="scss">
	.selectBox {
		/deep/.u-drawer-bottom {
			width: 100% !important;
			padding: 36rpx 20rpx 40rpx 20rpx;
			border-top-left-radius: 40rpx;
			border-top-right-radius: 40rpx;
			min-height: 30vh;
			max-height: 80vh !important;
			overflow-y: auto;
		}

		/deep/ {
			.u-drawer__scroll-view {
				max-height: 80vh;
			}

			.u-drawer>.u-drawer-content>.u-drawer__scroll-view>.uni-scroll-view>.uni-scroll-view {
				overflow: auto !important;
			}
		}

	}

	.addGoodBox {
		/deep/ .u-drawer {
			z-index: 100 !important;
		}
	}
	

	.list {
		/deep/.u-input__input {
			background-color: #F5F5F5;
			font-size: 28rpx;
			padding: 0 28rpx;
		}
	}
	
	.uploadContent {
		/deep/.u-list-item {
			margin-left: 0 !important;
		}
	}
	

	.u-switch-bak22 {
		width: 80rpx;
		height: 40rpx;

		/deep/.u-switch__node {
			width: 40rpx !important;
			height: 40rpx !important;
		}
	}
</style>
